package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.PointsBoardVO;
import com.tianji.learning.query.PointsBoardQuery;
import com.tianji.learning.service.IPointsBoardService;
import com.tianji.learning.service.impl.SignRecordConServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 学霸天梯榜 前端控制器
 * </p>
 *
 * @author wangyuqing
 * @since 2024-08-31
 */
@Api(tags = "积分排行榜相关接口")
@RestController
@RequestMapping("/boards")
@RequiredArgsConstructor
public class PointsBoardController {
    private final IPointsBoardService pointsBoardService;

    /**
     * 分页查询指定赛季积分排行榜
     *
     * @param query 分页参数；season：赛季id，为空或0时查询当前赛季；
     * @return
     */
    @GetMapping
    @ApiOperation("分页查询指定赛季积分排行榜")
    public PointsBoardVO queryPointsBoard(PointsBoardQuery query) {
        return pointsBoardService.pageQueryPointsBoradBySeanson(query);
    }
}
